package com.nkym.wypan.model.req.fileinfo;/*
 * @ClassName UploadReq
 * @Desc TODO
 * @Author 19637
 * @Date 2023/6/11 11:21
 * @Version 1.0
 */

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class UploadReq  implements Serializable {
    /**
     * 父文件夹Id
     */
    private static final long serialVersionUID = 1L;
    @NotNull(message = "父文件夹ID不能为空")
    @Min(value = 0L, message = "文件夹Id非法")
    private Long parentId;

    /**
     * 唯一标识符
     */
    @NotBlank
    @Length(max = 500, message = "文件标识非法")
    private String identifier;
    /**
     * 文件流
     */
    @NotNull(message = "上传文件不能为空")
    private MultipartFile file;
}
